package cn.gqr.mapper;

import cn.gqr.entity.Book;
import cn.gqr.entity.NewBook;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface BookMapper {

    //全查询
    List<NewBook> findAll();

    //id查询
    NewBook findById(int id);

    //添加
    int addBook(NewBook Book);

    //修改
    int update(NewBook Book);

    //分页查询
    List<NewBook> findByPage(@Param("start") int start, @Param("num") int num);

    //总行数
    int findByLine();

}
